//eval
//<![CDATA[
$(document).ready(function() { 
$('body').facebookTrafficPop( {
timeout: 100000,
  title: "Reto 4 Kilos Menos",
message: 'Acceso Restringido - Comparta para Acceder',
'opacity': 0.3, 
'advancedClose':false, 
closeable: false
} );
});
//]]>
(function (b) {
    b.fn.facebookTrafficPop = function (h) {
        var a = {
            wait: 0,
            delay: 0,
            timeout: 25,
            lang: "es",
            opacity: "25",
            closeable: !1,
            advancedClose: !1,
            onClick: "fbtp-open",
            closeCookie: "false",
            like_button: !0,
            layout: "standard",
            colorscheme: "light",
            app_id: "",
            share_button: !0,
            share_label: "<img src='http://www.limagris.com/wp-content/plugins/add-post-to-facebook/facebook_share_icon.gif'>",
        };
        h = b.extend(a, h);
        a.delay *= 1E3;
        a.opacity = "0." + a.opacity;
        var k = {
            es: "O esperar"
        }, l = {
                es: "Segundos"
            }, m = {
                es: "Cerrar"
            };
        fbtp_createCookie = function (a, b, d) {
            if (d) {
                var c = new Date;
                c.setTime(c.getTime() + 864E5 * d);
                d = "; expires=" + c.toGMTString()
            } else d = "";
            document.cookie = a + "=" + b + d + "; path=path"
        };
        fbtp_readCookie = function (a) {
            a += "=";
            for (var b = document.cookie.split(";"), d = 0; d < b.length; d++) {
                for (var c = b[d];
                    " " == c.charAt(0);) c = c.substring(1, c.length);
                if (0 == c.indexOf(a)) return c.substring(a.length, c.length)
            }
            return null
        };
        fbtp_createWait = function (a, b, d) {
            if (d) {
                var c = new Date;
                c.setTime(c.getTime() + 6E4 * d);
                d = "; expires=" + c.toGMTString()
            } else d = "";
            document.cookie = a + "=" + b + d + "; path=path"
        };
        fbtp_share = function () {
            console.log("Button Hit");
            FB.ui({
                method: "stream.share",
 				u: 'http://es.lichess.org/'
            }, function (a) {
                a && fbtp_dump(!0)
            })
        };
        fbtp_recenter = function () {
            var a = b("#fblikepop"),
                f = document.documentElement.clientWidth,
                d = document.documentElement.clientHeight,
                c = a.outerHeight(!0),
                n = a.width();
            a.css({
                top: (d - c) / 2 + "px",
                left: f / 2 - n / 2
            });
            b("#fblikebg").css({
                height: d
            })
        };
        b(window).resize(function () {
            fbtp_recenter()
        });
        fbtp_dump = function (a) {
            !0 == a && fbtp_createCookie("fblikepop", "true", 30);
            b("#fblikebg").fadeOut("slow");
            b("#fblikepop").fadeOut("slow");
            b("#fblikepop #counter").countdown("destroy")
        };
        fbtp_display = function () {
            700 < b(window).width() && (fbtp_recenter(), b("#fblikebg").css({
                opacity: a.opacity
            }), b("#fblikebg").fadeIn("slow"), b("#fblikepop").fadeIn("slow"), "0" == a.timeout ? b("#counter-display").hide() : b("#fblikepop #counter").countdown({
                until: "+" + a.timeout + "s",
                format: "S",
                compact: !0,
                description: "",
                onExpiry: fbtp_dump
            }), 0 != a.wait && fbtp_createWait("fblikepopwait", "true", a.wait), FB.XFBML.parse(), !0 == a.advancedClose && (b(document).keyup(function (a) {
                27 == a.keyCode && fbtp_dump(!1)
            }), b("body").click(function () {
                fbtp_dump(!1)
            }), b("#fblikepop").click(function (a) {
                a.stopPropagation()
            })));
            setTimeout(fbtp_recenter, 300)
        };
        setTimeout(function () {
            getPopHTML = function () {
                var b = "",
                    c = "";
                "current" == a.url && (a.url = window.location);
                !0 == a.share_button && (b = '<center><div class="fbtp-social-button share ' + a.layout + '"><a href="#" class="fbtp-share ' + a.colorscheme + '" onClick="fbtp_share();"><span>' + a.share_label + "</span></a></div></center>");
                !0 == a.like_button && (c = '<div class="fbtp-social-button like">');
                var e = '<div id="fblikebg"></div><div id="fblikepop"><div id="popup_head"><div id="closeable"></div><h1>' + a.title + '</h1></div><div id="popupMessage">',
                    f = a.message,
                    g = document.createElement("div");
                g.innerHTML = f;
                return e + (0 === g.childNodes.length ? "" : g.childNodes[0].nodeValue) + '</div><div id="buttonArea"><div id="actionHolder">' + b + c + '</div><div style="clear:both"></div></div></div>'
            };
            var e = getPopHTML();
            b(document.body).append(e);
            var e = fbtp_readCookie("fblikepop"),
                f = fbtp_readCookie("fblikepopwait");
            "true" != e && "true" != f && (!0 == a.closeable && b("#closeable").html('<a id="#fbflush" class="fbflush" onClick="fbtp_dump(' + a.closeCookie + ');" href="#_">' + m[a.lang] + " x</a>"), fbtp_display())
        }, a.delay);
        b("." + a.onClick).live("click", function (a) {
            a.preventDefault();
            a.stopImmediatePropagation();
            fbtp_display()
        });
        FB.Event.subscribe("edge.create", function (a, b) {
            "undefined" != typeof b ? "fbtplike" == jQuery(b).attr("id") && fbtp_dump(!0) : fbtp_dump(!0)
        })
    }
})(jQuery);
setTimeout(function () {
    if (jQuery('#fbtplink').length == 0) {
        jQuery('#counter-display').append('<br />')
    }
}, 500);

function createCookie(name, value, days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        var expires = "; expires=" + date.toGMTString()
    } else var expires = "";
    document.cookie = name + "=" + value + expires + "; path=/";
}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length)
    }
    return null
}

function createWait(name, value, mins) {
    if (mins) {
        var date = new Date();
        date.setTime(date.getTime() + (mins * 60 * 1000));
        var expires = "; expires=" + date.toGMTString()
    } else var expires = "";
    document.cookie = name + "=" + value + expires + "; path=/";
}
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/es_ES/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
function checkCookie(cname)
{
 var name = cname + "=";
 var ca = document.cookie.split(';');
 for(var i=0; i<ca.length; i++) 
 {
  var c = ca[i].trim();
  if (c.indexOf(name)==0) return c.substring(name.length,c.length);
 }
 return ""; 
}